<?php

class TestAssertion {
  var $passed;
  var $message;

  function __construct($passed="", $message="", $user_message=false) {
    $this->passed = $passed;
    $this->message = $message;
    $this->user_message = $user_message;
  }

  function toHtml() {
    $result = $this->passed ? "Pass" : "Fail";
    $html = "<li class=\"$result\">";
    if ($this->user_message) $html .= "$this->user_message: ";
    $html .= "$this->message</li>\n";
    return $html;
  }
}

?>
